package com.cy.ppj.dao.mapper.order;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.cy.ppj.model.domian.order.OrderImage;
import com.cy.ppj.model.enums.order.OrderImageType;
import com.cy.ppj.model.vo.order.OrderImageListVO;

import tk.mybatis.mapper.common.BaseMapper;

/**
 * OrderImageMapper
 *
 * @author tanyilin
 *
 * @create 2019年2月25日 下午2:38:55
 */
@Mapper
public interface OrderImageMapper extends BaseMapper<OrderImage> {

	/**
	 * 批量新增
	 * 
	 * @param orderImageList
	 */
	void insertBatch(@Param("orderImageList") List<OrderImage> orderImageList);

	/**
	 * 根据更新时间删除无效数据
	 *
	 * @param orderId
	 * @param updateTime
	 */
	void deleteByUpdateTime(@Param("orderId") Long orderId, @Param("type") OrderImageType type, @Param("updateTime") Date updateTime);

	/**
	 * 查询订单的图片列表
	 * 
	 * @param orderId
	 * @return
	 */
	List<OrderImageListVO> selectOrderImageListByOrderId(@Param("orderId") Long orderId, @Param("type") OrderImageType type);
}
